//
//  OwnerCleanKingViewController.m
//  GoodWayClient
//
//  Created by newhuidong on 16/1/5.
//  Copyright © 2016年 HuiDong. All rights reserved.
//

#import "OwnerCleanKingViewController.h"
#import "MBProgressHUD+NJ.h"
@interface OwnerCleanKingViewController ()<UIWebViewDelegate>
@property(nonatomic,strong)UIWebView *webView;

@end

@implementation OwnerCleanKingViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self loadWebView];
}
-(void)loadWebView{
    
    NSURL * url =[NSURL URLWithString:@"http://www.baidu.com"];
    self.webView =[[UIWebView alloc]initWithFrame:[UIScreen mainScreen].bounds];
    NSURLRequest * request = [NSURLRequest requestWithURL:url];
    self.webView.delegate=self;
    self.webView.scalesPageToFit=YES;
    [self.webView sizeToFit];
    
    [self.webView loadRequest:request];
    [self.view addSubview:self.webView];
}
-(void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error{
    
    [MBProgressHUD showError:@"加载失败"];
    NSLog(@"error is%@",error);
    
}
-(void)webViewDidStartLoad:(UIWebView *)webView{
    

    
}
-(void)webViewDidFinishLoad:(UIWebView *)webView{
    
    [MBProgressHUD hideHUD];
}
-(void)viewWillAppear:(BOOL)animated{
    
    [MBProgressHUD showMessage:@"加载中..."];
    

    
}
-(void)viewDidAppear:(BOOL)animated{

}
@end
